Current Location: Home> Function Categories> hypot

hypot

Calculate the oblique length of a straight triangle
Name:hypot
Category:math
Programming Language:php
One-line Description:Calculate the length of the beveled edge of a right triangle.

Definition and usage

hypot() function calculates the length of the oblique side of a straight triangle.

Example

 <?php
echo hypot ( 2 , 3 ) ;
echo hypot ( 3 , 6 ) ;
echo hypot ( 3 , 6 ) ;
echo hypot ( 1 , 3 ) ;
?>

Try it yourself

grammar

 hypot ( x , y )
parameter describe
x Required. The length of the edge x.
y Required. The length of the edge y.

illustrate

hypot() function will calculate the length of the oblique side according to the two straight solution edge lengths x and y of a right triangle. Or the distance from punctuation point (x, y) to the origin. The algorithm of this function is equivalent to sqrt(x*x + y*y).

Similar Functions
  • Leave the method of sorting floor

    floor

    Leavethemethodofsort
  • Determine whether it is a finite value is_finite

    is_finite

    Determinewhetheritis
  • Hyperbolic cosine cosh

    cosh

    Hyperboliccosine
  • Reverse cosine acos

    acos

    Reversecosine
  • Returns log(1 + number), and can calculate the exact result even when the value of number is close to zero. log1p

    log1p

    Returnslog(1+number)
  • Get the pi value pi

    pi

    Getthepivalue
  • Antihyperbolic cosine acosh

    acosh

    Antihyperboliccosine
  • Antihyperbolic tangent atanh

    atanh

    Antihyperbolictangen
Popular Articles